package com.wuliang.blog.entities;

import com.wuliang.blog.core.basic.BasicEntity;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author WuLiang
 */
@Data
@Entity
@ApiModel("分类")
@EqualsAndHashCode(callSuper = true)
@Table(name = "t_classification",schema = "wu_liang_blog")
public class Classification extends BasicEntity {

    @Column(name = "classification_name", columnDefinition = "varchar(255) default '' comment '分类名称'")
    private String classificationName = "";

    @Column(name = "classification_level", columnDefinition = "int(5) default 0 comment '分类等级'")
    private Integer classificationLevel = 0;

    @Column(name = "parent_id", columnDefinition = "int(10) not null comment '上一级分类主键ID'")
    private Integer parentId = 0;

}
